<?php
namespace app\index\controller;
use think\Controller;
	class Hello extends Controller
	{
		public function index()
		{
			$nu="ni hao";
			$vue='Vue.component("world",{template:"<div>hello world</div>"})';
			$this->assign("vue",$vue);
			$this->assign("n",$nu);
			return $this->fetch();
		}
		public function api(){
			session_start();
			$data["a"]="as";
			$data["b"]="qw";
			//$cook=input("cookie.name");//跨域请求
			$cook=$_COOKIE["name"];
			$d=\input("cookie.PHPSESSID");
			cookie("name","liusqw");
			$data["c"]=$cook;
			$data["d"]=$d;
			header("Access-Controller-Allow-Origin:*");
			header("Access-Control-Allow-Credentials:true");
			return json($data);
		}
	}